package cn.dengta.webapp.user.vo;

import java.util.Map;

import cn.dengta.common.model.ValueProxyImpl;
import cn.dengta.context.model.WesKit;
import cn.dengta.webapp.base.vo.AbstractVO;
import cn.dengta.webapp.user.entity.Feedback;
import cn.dengta.webapp.user.entity.Feedback.FeedbackType;
import cn.dengta.webapp.user.model.Gender;
import lombok.Getter;
import lombok.Setter;
import me.codeplayer.util.X;

@Getter
@Setter
public class FeedbackVO extends AbstractVO<Feedback> {

	/** 用户ID */
	private Long userId;
	public Map<String, Object> user;
	/** 类型 */
	private FeedbackType type;
	/** 操作备注 */
	private String remark;
	/** 图片 */
	private String images;
	/** 分包 */
	private WesKit wesKit;
	/** 性别 */
	private Gender gender;
	/** 用户昵称 */
	private String nickname;

	public static FeedbackVO from(Feedback source) {
		return copy(source, FeedbackVO::new);
	}

	public Integer getType() {
		return X.map(type, FeedbackType::getValue);
	}

	public String getType_() {
		return X.map(type, FeedbackType::getLabel);
	}

	public String getAddTime_() {
		return super.getAddTime_();
	}

	public String getGender_() {
		return ValueProxyImpl.label(gender);
	}

	public String getWesKit_() {
		return ValueProxyImpl.label(wesKit);
	}

}
